<?php defined('InShopNC') or exit('Access Invalid!');?>
<div class="ncm-container">
<?php include template('member/member_left');?>
  <div class="right-layout">
<div class="wrap">
  <div class="tabmenu">
    <?php include template('layout/submenu');?>
	<a href="javascript:void(0)" class="ncm-btn ncm-btn-orange" nc_type="dialog" dialog_title="<?php echo $lang['member_address_new_address'];?>" dialog_id="my_address_add"  uri="index.php?act=member_address&op=address&type=add" dialog_width="550" title="<?php echo $lang['member_address_new_address'];?>"><i class="icon-map-marker"></i><?php echo $lang['member_address_new_address'];?></a></div>
  <div class="alert alert-success">
    <h4>操作提示：</h4>
    <ul>
      <li>最多可保存20个有效地址</li>
    </ul>
  </div>
	<table class="ncm-default-table" >
    <thead>
      <tr>
      	<th class="w10"></th>
        <th class="tl"><?php echo $lang['member_address_receiver_name'];?></th>
        <th class="tl"><?php echo $lang['member_address_location'];?></th>
        <th class="w300 tl"><?php echo $lang['member_address_phone'];?>/<?php echo $lang['member_address_mobile'];?></th>
        <th class="w110"><?php echo $lang['nc_handle'];?></th>
      </tr>
    </thead>
    <?php if(!empty($output['address_list']) && is_array($output['address_list'])){?>
    <tbody>
      <?php foreach($output['address_list'] as $key=>$address){?>
      <tr class="bd-line">
      	<td></td>
        <td class="tl"><?php echo $address['true_name'];?></td>
        <td class="tl"><?php echo $address['area_info'];?><?php echo $address['address'];?></td>
        <td class="tl"><?php if(!empty($address['tel_phone'])){?><span class="mr20"><i class="icon-phone"></i><?php echo $address['tel_phone'];?></span> <br/><?php } ?>
          <?php if(!empty($address['mob_phone'])){?><span><i class="icon-mobile-phone"></i><?php echo $address['mob_phone']; ?></span></td><?php } ?>
        <td class="ncm-table-handle"><span><a href="javascript:void(0);" class="btn-blue" dialog_id="my_address_edit" dialog_width="550" dialog_title="<?php echo $lang['member_address_edit_address'];?>" nc_type="dialog" uri="index.php?act=member_address&op=address&type=edit&id=<?php echo $address['address_id'];?>"><i class="icon-edit"></i><p>编辑</p></a></span><span><a href="javascript:void(0)" class="btn-red" onclick="ajax_get_confirm('<?php echo $lang['nc_ensure_del'];?>', 'index.php?act=member_address&op=address&id=<?php echo $address['address_id'];?>');"><i class="icon-trash"></i><p><?php echo $lang['nc_del_&nbsp'];?></p></a></span></td>
      </tr>
      <?php }?>
      <?php }else{?>
      <tr>
        <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span><?php echo $lang['no_record'];?></span></div></td>
      </tr>
      <?php }?>
    </tbody>
    <tfoot>
      <?php if(!empty($output['address_list']) && is_array($output['address_list'])){?>
      <tr>
        <td colspan="20">&nbsp;</td>
      </tr>
      <?php }?>
    </tfoot>
  </table>
</div>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/common_select.js" charset="utf-8"></script>
  </div>
  <div class="clear"></div>
</div>